namespace OracleInternal.BinXml
{
	internal class ObxmlDecodeRequest
	{
		private ObxmlContentObject encodedContent;

		internal ObxmlOutputObject m_RequestOutput;

		internal long m_CountRemaining;

		internal ObxmlContentObject EncodedContent => encodedContent;

		internal bool IsFullDecode
		{
			get;
			set;
		}

		internal long TextLengthRequested
		{
			get;
			set;
		}

		internal ObxmlDecodeRequest()
		{
			m_RequestOutput = new ObxmlOutputObject(this);
			encodedContent = new ObxmlContentObject(this);
			ResetRequestObject();
		}

		internal void SetObxmlDecodeRequest(bool isFullDecode, long textLengthRequested = -1L)
		{
			IsFullDecode = isFullDecode;
			TextLengthRequested = textLengthRequested;
		}

		internal bool IsRequestValid()
		{
			if (TextLengthRequested != 0L && EncodedContent.IsContentValid())
			{
				return m_RequestOutput.IsOutputValid();
			}
			return false;
		}

		internal bool ResetRequestObject()
		{
			EncodedContent.ResetContentObject();
			m_RequestOutput.ResetOutputObject();
			IsFullDecode = true;
			TextLengthRequested = 0L;
			return true;
		}
	}
}
